package com.ziyun.erp.modules.unitLibrary.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import com.ziyun.erp.modules.unitLibrary.dao.UnitLibraryDao;
import com.ziyun.erp.modules.unitLibrary.entity.UnitLibraryEntity;
import com.ziyun.erp.modules.unitLibrary.service.UnitLibraryService;


@Service("unitLibraryService")
public class UnitLibraryServiceImpl extends ServiceImpl<UnitLibraryDao, UnitLibraryEntity> implements UnitLibraryService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<UnitLibraryEntity> page = this.selectPage(
                new Query<UnitLibraryEntity>(params).getPage(),
                new EntityWrapper<UnitLibraryEntity>()
                .eq("del_flag",0)
        );

        return new PageUtils(page);
    }

    @Override
    public Integer flagDelete(Integer[] ids, String username) {
        return this.baseMapper.flagDelete(ids,username);
    }

}
